package com.zyg.factorybean;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAspect implements MethodInterceptor{

	public Object invoke(MethodInvocation invocation) throws Throwable {
		before();
		Object obj = invocation.proceed();
		after();
		return obj;
	}
	
	public void before() {
		System.out.println("前置通知");
	}
	
	public void after() {
		System.out.println("后置通知");
	}
	
	
}
